import os

from align_LADN_and_fpp_pk import write_landmarks_on_img
from attack import get_landmarks


def main():
    # api_landmarks = pickle.load(open("/media/sdb/xzw/Adv-Makeup/Datasets_Makeup/landmark_aligned_600.pk", 'rb'))
    # # xzw_lmk = api_landmarks["before_aligned_600/xzw_1440.jpg"]
    # id00300_lmk = api_landmarks["before_aligned_600/00300.jpg"]
    before_aligned_600_dir_path = "/media/sdb/xzw/Adv-Makeup/Datasets_Makeup/before_aligned_600/"
    transformed_img_dir_path = "/media/sdb/xzw/Adv-Makeup/Datasets_Makeup/landmark_align/transform"
    id00300_img_path = os.path.join(before_aligned_600_dir_path, "00300.jpg")
    old_id00300_lmk_gotten_by_us = get_landmarks(id00300_img_path)
    write_landmarks_on_img(old_id00300_lmk_gotten_by_us, id00300_img_path,
                           os.path.join(transformed_img_dir_path, "00300_added_landmark.png"))


if __name__ == '__main__':
    main()
